package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 套餐口味mapper
 */
@Mapper
public interface SetmealDishMapper {


    List getSetmealIdBydishID(List<Long> ids);


    void saveSetmealDish(List<SetmealDish> setmealDishes);


    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void delete(Long id);

    /**
     * 根据套餐id查关联的的所有菜品
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmeal_id} ")
    List<SetmealDish> getDishBySetMealId(Long setmeal_id);


    void update(SetmealDish setmealDish);
}
